home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
s-gikan2.maizuru-ct.ac.jp
/
s-gikan2.maizuru-ct.ac.jp.zip
/
s-gikan2.maizuru-ct.ac.jp
/
pub
/
ncvc352_install.exe
/
{app}
/
scripts
/
LatheViewCompleteSet
/
change_YX_XZ.pl
< prev
next >
Wrap
Perl Script
|
2004-11-10
|
469b
|
29 lines
#! /usr/bin/perl
# NCÉ∙ö╒ùpGâRü[âhé≡üANCVCé┼ò\Īé╖éΘé╜é▀Ä▓ò╧è╖é╖éΘâXâNâèâvâg #
%XZ= ("Z","X","X","Y","K","I","I","J");
$pre_file= $ARGV[0];
$out_file= $ARGV[1];
open(IN,$pre_file);
open(OUT,">$out_file");
while(<IN>){
if(!/^N?[0-9\s]*[\(\%]/){
if(/[ZXKI]/){
$new_line= "";
while(/([ZXKI])([0-9\-\.]+)/){
$new_line= $new_line.$`.$XZ{$1}.$2;
$_= $';
}
$_= $new_line.$_;
}
}
print OUT;
}
close(OUT);
close(IN);